<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">学校</label>
            <div class="layui-input-block">
                <input name="school_id" value="{$vo.school_id|default=''}" data-source="{:url('/admin/school/selectpage')}" data-position="fixed" data-field="name" placeholder="学校" class="layui-input selectpage">
            </div>
        </div>

        <div class="layui-form-item" >
            <label class="layui-form-label">社团名称</label>
            <div class="layui-input-block">
                <input name="course_id" value="{$vo.course_id|default=''}" data-source="{:url('/admin/course/selectpage')}" data-position="fixed" data-field="name" placeholder="社团"  class="layui-input selectpage">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label label-required">活动图片<span class="nowrap color-red">700*420</span></label>
            <div class="layui-input-block layui-form">
                <input name="images" data-upload-image="Multiple" type="hidden" value="{$vo.images|default=''}">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label label-required">活动视频<span class="nowrap color-red"></span></label>
            <div class="layui-input-block">
                <block>
<!--                        <video width="320" height="240" controls>-->
<!--                            <source src="{$value|default=''}" type="video/mp4">-->
<!--                            您的浏览器不支持 video 标签。-->
<!--                        </video>-->
                    <input name="video" data-upload-video="Multiple" type="hidden" value="{$vo.video|default=''}">
                </block>
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block layui-form">
                <input name="desc" required value='{$vo.desc|default=""}' placeholder="请输入描述" class="layui-input">
<!--                {$vo.desc|default=""}-->
            </div>
        </div>

    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        <!--{notempty name='vo.id'}-->
        <input type='hidden' value='{$vo.id}' name='id'>
        <!--{/notempty}-->
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>
{block name="script"}
<script>
    require(['layui'],function () {
        layui.use(['form','laydate','layer'],function() {
            window.form = layui.form;
            require(['form'], function () {
                apply('{$vo.is_hot|default="0"}');
                window.form.render();
                window.form.on('radio(bannertype)', function (data) {
                    apply(data.value);
                });
                function apply(value) {
                    $("[data-is_hot='" + value + "']").trigger('click');
                }
            })

        })
    });
    layui.use('laydate', function(){
        // var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#begin_time', //指定元素
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_time', //指定元素
            type: 'datetime'
        });
        laydate.render({
            elem: '#begin_choose_time', //指定元素
            type: 'datetime'
        });
        laydate.render({
            elem: '#end_choose_time', //指定元素
            type: 'datetime'
        });
    });
</script>
{/block}